﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>退货界面</title>
    <!--<link type="text/css" rel="stylesheet" href="../static/css/Return.css"/>-->
<link type="text/css" rel="stylesheet" href="/css/Retreat.css"/>
</head>
<body>
<div class="returnTop">
    <!--头部开始-->
    <div class="StockHead">
        <span>退货记录</span>
    </div>
    <!--头部结束-->
    <div class="return_box">

        <div class="top">

            <form id="retreat" method="post">
                    <table class="providerTable" cellpadding="0" cellspacing="0">
                        <tr class="firstTr">

                            <th width="5%">编号<span></span></th>
                            <th width="15%">退货订单号<span></span></th>
                            <th width="22%">退货日期<span></span></th>
                            <th width="13%">退货原因<span></span></th>
                            <th width="10%">总金额</th>
                            <th width="10%">删除</th>
                            <th width="10%">查看</th>
                        </tr>

                        <tr th:each="t,line : ${paRetreat.items}">
                            <th><span th:text="${line.count}"></span></th>
                            <th><span th:text="${t.orderId}"></span></th>
                            <th><span th:text="${t.refunDate}" ></span></th>
                            <th><span th:text="${t.refundReason }"></span></th>
                            <th><span th:text="${t.totalPrice}"></span></th>
                            <th  th:id="${t.orderId}">
                                <a class="button-delete"><img src="/images/delete.png" width="20" height="20" alt="加载失败"></a>
                            </th>
                            <th>
                                <a class="button-look"><img src="/images/look.png" width="20" height="20" alt="加载失败"></a>
                            </th>
                    </table>
            </form>
                    </div>
        <div class="page-bar">
            <ul class="pageIndex">
                <li th:object="${paRetreat}">
                    <span th:text="|共*{count}条记录|"></span>&nbsp;&nbsp;
                    <span th:text="|*{curr}/*{total}|"></span>
                </li>&nbsp;&nbsp;

                <a href="javascript:void(0)" name="test">首页</a>
                <a href="javascript:void(0)" name="test">上一页</a>
                <a href="javascript:void(0)" name="test">下一页</a>
                <a href="javascript:void(0)" name="test">尾页</a> &nbsp;&nbsp;
            </ul>
            <span class="page-go-form">
			<label>跳转至</label>
			<input type="text" name="inputPage" id="inputPage" class="page-key"
                   th:value="${paRetreat.curr }"/>页
			<button type="button" class="page-btn">GO</button>
		</span>
        </div>
            </div>
    </div>

</body>
<script src="/js/jquery-2.2.1.min.js"></script>
<script src="/js/jump.js"></script>
<script type="text/javascript" th:inline="javascript">
    /*分页开始*/
    /* thymeleaf的js中, 获取后台数据 */
    var curr = [[${paRetreat?.curr ?: 1}]];
    var total = [[${paRetreat?.total ?: 0}]];

    // alert(curr + " : " + total)

    //判断, 是否是第一页
    if(curr == 1){
        $(".pageIndex a:lt(2)").hide();
    }
    //判断, 是否是最后一页
    if(curr == total){
        $(".pageIndex a:gt(1)").hide();
    }

    $(".pageIndex a:eq(0)").bind("click", function() {
        alert("[[${paRetreat.total}]]");
        location = "/lookCommodity/recording", $("#retreat").serialize() + "&curr=1"
        // toJump("/lookCommodity/query", $("#chooseForm11").serialize() + "&curr=1"+"&column="+[[${orderInfo?.column ?: ""}]]
        //     +"&state="+[[${orderInfo?.state ?: ""}]]);
    });
    $(".pageIndex a:eq(1)").bind("click", function() {
        alert("[[${paRetreat.total}]]");
        location = "/lookCommodity/recording?"+$("#retreat").serialize()+"&curr=[[${paRetreat.curr-1}]]"
        // toJump("/lookCommodity/query", $("#chooseForm11").serialize() + "&curr=[[${paCommodity.curr-1}]]"+"&column="+[[${orderInfo?.column ?: ""}]]
        //     +"&state="+[[${orderInfo?.state ?: ""}]]);
    });
    $(".pageIndex a:eq(2)").bind("click", function() {
        alert("[[${paRetreat.total}]]");
        location = "/lookCommodity/recording?"+$("#retreat").serialize()+"&curr=[[${paRetreat.curr+1}]]"
        // toJump("/lookCommodity/query", $("#chooseForm11").serialize() + "&curr=[[${paCommodity.curr+1}]]"+"&column="+[[${orderInfo?.column ?: ""}]]
        //     +"&state="+[[${orderInfo?.state ?: ""}]]);
    });
    $(".pageIndex a:eq(3)").bind("click", function() {
        alert("[[${paRetreat.total}]]");
        location = "/lookCommodity/recording?"+$("#retreat").serialize() + "&curr=[[${paRetreat.total}]]";
        // toJump("/lookCommodity/query", $("#chooseForm11").serialize() + "&curr=[[${paCommodity.total}]]"+"&column="+[[${orderInfo?.column ?: ""}]]
        //     +"&state="+[[${orderInfo?.state ?: ""}]]);
    });
</script>
</html>